import Vue from 'vue'
import App from './App'

import {
	myRequest,
  showToast,
} from './common/api.js'
Vue.prototype.$myRuquest = myRequest
Vue.prototype.$showToast = showToast

import basics from './pages/basics/home.vue'
Vue.component('basics', basics)

import components from './pages/component/home.vue'
Vue.component('components', components)

import cuCustom from './colorui/components/cu-custom.vue'
Vue.component('cu-custom', cuCustom)

// 引入个人中心页面
import user from './pages/user/user.vue'
Vue.component('user', user)

let isBaseUrl = 1; // 0为测试域名 1为正式域名 
let baseUrl = isBaseUrl ? 'https://jxjsservice.jxfit.cn' : 'http://192.168.1.102:9091';
uni.setStorageSync("baseUrl", baseUrl)

uni.getStorage({
	key: 'openid',
	success: (res) => {
		
	},
	fail: () => {
		uni.navigateTo({
			url: '/pages/login/login'
		});
	}
});


Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	...App
})
app.$mount()
